package com.stormrage.edu.serv.learn.impl;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.stormrage.edu.dao.learn.LeaStudentVideoDao;
import com.stormrage.edu.serv.learn.LeaStudentVideoServ;
import com.stormrage.entity.learn.rep.LeaStudentVideoRep;
import com.stormrage.entity.learn.req.LeaStudentVideoReq;
import com.stormragetech.core.exception.StormrageTechException;

/**
 * @Title: LeaStudentVideoServImpl.java
 * @Package com.stormrage.edu.serv.learn.impl
 * @Description: 学员学习课件 Service
 * @author www.stormragetech.com
 * @date 2016年4月21日
 * @version V1.0
 */
@Service
public class LeaStudentVideoServImpl implements LeaStudentVideoServ {

	private static final Logger logger = LoggerFactory.getLogger(LeaStudentVideoServImpl.class);

	@Autowired
	private LeaStudentVideoDao leaStudentVideoDao;

	@Override
	public List<LeaStudentVideoRep> queryListForStudy(Integer arg0) throws StormrageTechException {

		logger.debug(" 【 Serv 】- 【 LeaStudentVideoServ 】- 【 QueryListForStudy 】- 开始运行 ");

		Map<String, Object> map = new HashMap<String, Object>();
		map.put("stuId", arg0);

		List<LeaStudentVideoRep> array = leaStudentVideoDao.queryListForStudy(map);

		logger.debug(" 【 Serv 】- 【 LeaStudentVideoServ 】- 【 QueryListForStudy 】- 完成运行 ");
		return array;

	}

	@Override
	public List<LeaStudentVideoRep> queryListForSelectStudy(final LeaStudentVideoReq arg0)
			throws StormrageTechException {

		logger.debug(" 【 Serv 】- 【 LeaStudentVideoServ 】- 【 QueryListForSelectStudy 】- 开始运行 ");

		Map<String, Object> map = new HashMap<String, Object>();
		map.put("stuId", arg0.getStuId());
		map.put("ness", arg0.getNess());

		List<LeaStudentVideoRep> array = leaStudentVideoDao.queryListForSelectStudy(map);

		logger.debug(" 【 Serv 】- 【 LeaStudentVideoServ 】- 【 QueryListForSelectStudy 】- 完成运行 ");
		return array;

	}

}
